LOCK_SH requests a shared lock, LOCK_EX requests an exclusive lock, and LOCK_UN releases a previously requested lock. If LOCK_NB is bitwise-or'ed with LOCK_SH ...
Place an exclusive lock. Only one process may hold an exclusive lock for a given file at a given time. LOCK_UN: Remove an existing lock held by this process.
LOCK_UN Remove an existing lock held by this process. A call to flock() may block if an incompatible lock is held by another process. To make a nonblocking ...